﻿{% extends "gma/base.html" %}
{% load mytag %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

<div class="page__bd">
{#    <div class="weui-cells__title">基本数据</div>#}
{#    <div class="weui-cells">#}
{#        {% if user.avatar %}#}
{#        <a class="weui-cell weui-cell_access" href="{% url 'gma:gallery' user.avatar %}">#}
{#            <div class="weui-cell__bd"> <p>头像</p> </div>#}
{#            <div class="weui-cell__ft"> <img src="{{ user.avatar|cdn }}" class="right_large_avatar"> </div>#}
{#        </a>#}
{#        {% endif %}#}
{##}
{#        <div class="weui-cell">#}
{#            <div class="weui-cell__bd"> <p>用户id</p> </div>#}
{#            <div class="weui-cell__ft">{{ user.id }}</div>#}
{#        </div>#}
{##}
{#        <div class="weui-cell">#}
{#            <div class="weui-cell__bd"> <p>昵称</p> </div>#}
{#            <div class="weui-cell__ft">{{ user.auth_nickname }}</div>#}
{#        </div>#}
{#    </div>#}

    <div class="weui-panel weui-panel_access">
        <div class="weui-panel__hd"> 基本数据 </div>
        <div class="weui-panel__bd">
            {% if user.avatar %}
            <a class="weui-cell weui-cell_access" href="{% url 'gma:gallery' user.avatar %}">
                <div class="weui-cell__bd"> <p>头像</p> </div>
                <div class="weui-cell__ft"> <img src="{{ user.avatar|cdn }}" class="right_large_avatar"> </div>
            </a>
            {% endif %}

            <div class="weui-cell">
                <div class="weui-cell__bd"> <p>用户id</p> </div>
                <div class="weui-cell__ft">{{ user.id }}</div>
            </div>

            <div class="weui-cell">
                <div class="weui-cell__bd"> <p>昵称</p> </div>
                <div class="weui-cell__ft">{{ user.auth_nickname }}</div>
            </div>
        </div>
    </div>

    <div class="weui-panel weui-panel_access">
        <div class="weui-panel__hd"> 漏接记录 </div>
        <div class="weui-panel__bd">
            {% for log in logs %}
            <a href="{% url 'gma:caster_detail' log.target_uid %}" class="weui-media-box weui-media-box_appmsg weui-cell_access">
                <div class="weui-media-box__hd">
                    <img class="weui-media-box__thumb avatar" src="{{ log.caller_avatar|cdn }}" alt="">
                </div>

                <i class="fa fa-phone-volume"></i>
                &nbsp; &nbsp;
                <div class="weui-media-box__hd">
                    <img class="weui-media-box__thumb avatar" src="{{ log.callee_avatar|cdn }}" alt="">
                </div>

                <div class="weui-media-box__bd">
                    <p class="weui-media-box__desc"> {{ log.begin_time|date:"Y-m-d" }} #{{ log.id }}</p>
                    <p class="weui-media-box__desc"> {{ log.begin_time|date:"H:i:s" }} ~ {{ log.end_time|date:"H:i:s" }} </p>
                    <p class="weui-media-box__desc">时长: {{ log.chat_seconds|readable_seconds }}</p>
{#                    <p class="weui-media-box__desc">费用: {{ log.expense }} <i class="fa fa-gem"></i></p>#}

                    {% if log.status == 1 %}
                    <p class="weui-media-box__desc">状态: <span class="green_color">{{ log.status|call_status }}</span></p>
                    {% elif log.status == 2 %}
                    <p class="weui-media-box__desc">状态: <span class="red_color">{{ log.status|call_status }}</span></p>
                    {% elif log.status == 3 %}
                    <p class="weui-media-box__desc">状态: <span class="yellow_color">{{ log.status|call_status }}</span></p>
                    {% else %}
                    <p class="weui-media-box__desc">状态: {{ log.status|call_status }} </p>
                    {% endif %}
                </div>

                <div class="weui-cell__ft">
                </div>
            </a>
            {% endfor %}

           <div class="weui-media-box weui-media-box_text">
                <ul class="weui-media-box__info">
                    <li class="weui-media-box__info__meta"> 累计漏接 {{ total_dropped_call_count }} 次</li>
                </ul>
           </div>
        </div>
    </div>
</div>

<div class="page__ft">
    <a href="{% url 'gma:home' %}">
        <span class="bottom-logo">
           HiBao
       </span>
    </a>
</div>

{% endblock content %}


<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}
{% endblock extra_js %}